; 捕获所有标签名作为定义
(
  (element
    (start_tag
      (tag_name) @name.definition.tag
    )
  )
)

; 捕获 class 属性值作为定义
(
  (element
    (start_tag
      (attribute
        (attribute_name) @attribute-name
        (#eq? @attribute-name "class")
        (quoted_attribute_value
          (attribute_value) @name.definition.html_class
        )
      )
    )
  )
)

; 捕获 id 属性值作为定义
(
  (element
    (start_tag
      (attribute
        (attribute_name) @attribute-name
        (#eq? @attribute-name "id")
        (quoted_attribute_value
          (attribute_value) @name.definition.html_id
        )
      )
    )
  )
)